<%@ page import="bean.User" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page import="java.util.List" %><%--
  Created by IntelliJ IDEA.
  User: liuchangling
  Date: 2021/5/30
  Time: 4:49 下午
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="css/bootstrap.min.css">
    <title>查询结果</title>
</head>
<style>
    td, th {
        text-align: center;
    }
</style>
<body style="padding: 50px;">
<table class="table table-responsive">
    <thead>
    <tr>
        <th>工号</th>
        <th>姓名</th>
        <th>性别</th>
        <th>出生日期</th>
        <th>邮箱</th>
        <th>备注</th>
        <th>班级编号</th>
    </tr>
    </thead>
    <tbody>
    <c:forEach var="user" items="${result}" varStatus="status">
        <c:if test="${status.index%2==0}">
            <tr class="info">
                <td>${user.sno}
                </td>
                <td>${user.name}
                </td>
                <td>
                    <c:if test="${user.sex=='male'}">
                        男
                    </c:if>
                    <c:if test="${user.sex!='male'}">
                        女
                    </c:if>
                </td>
                <td>${user.birthday}
                </td>
                <td>${user.mail}
                </td>
                <td>${user.remark}
                </td>
                <td>${user.classNo}
                </td>
            </tr>
        </c:if>
        <c:if test="${status.index%2!=0}">
            <tr class="warning">
                <td>${user.sno}
                </td>
                <td>${user.name}
                </td>
                <td>
                    <c:if test="${user.sex=='male'}">
                        男
                    </c:if>
                    <c:if test="${user.sex!='male'}">
                        女
                    </c:if>
                </td>
                <td>${user.birthday}
                </td>
                <td>${user.mail}
                </td>
                <td>${user.remark}
                </td>
                <td>${user.classNo}
                </td>
            </tr>
        </c:if>
    </c:forEach>
    </tbody>
</table>

</body>
</html>
